package com.newasia.shopping.dto;

import com.newasia.commons.result.AbstractRequest;
import com.newasia.commons.tool.exception.ValidateException;
import com.newasia.shopping.constants.ShoppingRetCode;
import lombok.Data;

import java.util.List;

@Data
public class GetSkuIdRequest extends AbstractRequest {

    private Long spuId;

    private List<Long> options;

    @Override
    public void requestCheck() {
        if(spuId==null||options.size()==0){
            throw new ValidateException(ShoppingRetCode.REQUISITE_PARAMETER_NOT_EXIST.getCode(),ShoppingRetCode.REQUISITE_PARAMETER_NOT_EXIST.getMessage());
        }
    }
}
